//pintia.cn计算摄氏温度（L1-004）
// let rs = require('readline-sync')
// let str_num = rs.question()
// let num = parseInt(str_num)//将字符串的150转化成数字的150
// let c = 5*(num-32)/9//5×(F−32)/9
// let result = Math.floor(c)
// console.log(`Celsius = ${result}`)//波浪线的键盘处


// const readline = require("readline");
// const rl = readline.createInterface({
//   input: process.stdin,
//   output: process.stdout,
// });

// let input_arr = []
// rl.on('line', function (line) {
//   input_arr.push(line)
// });

// rl.on('close', function () {
//   //解题代码
//   let str_num = input_arr[0]
//   let num = parseInt(str_num)
//   // 5×(F−32)/9
//   let c = 5 * (num-32)/9
//   let result = parseInt(c)
//   console.log(`Celsius = ${result}`);
// })

const readline = require("readline");//let也行
const rl = readline.createInterface({
 input: process.stdin,
 output: process.stdout,
});

let input_arr = []
rl.on('line', function (line) {//回调函数
 input_arr.push(line)//所有行存在数组里
}
);

rl.on('close', function () {//需要按ctrl+C，之后才会进入close事件，进行数据处理。
 //在close方法里输入解题代码
 let str_num = input_arr[0]
 let num = parseInt(str_num)//将字符串的150转化成数字的150
 // 5×(F−32)/9
 let c = 5 * (num-32)/9
 let result = parseInt(c)
 console.log(`Celsius = ${result}`);
})
